/**
 * 研发经费强度
 * 
 * @class research_money_gridpanel_stroe
 * @extends Ext.data.Store
 */
research_money_gridpanel_stroe = Ext.extend(Ext.data.Store, {
	constructor : function() {
		research_money_gridpanel_stroe.superclass.constructor.call(this, {
			proxy : new Ext.data.HttpProxy({
						method : 'GET',
						url : 'cxxqysjsb/research_money/getenterprisefunds.action?uid='
								+ userId
					}),
			reader : new Ext.data.JsonReader({
				fields : ['funds_id', 'enterprise_id', 'editable',
						'funds_intensity', 'funds_year', 'funds_is_new',
						'funds_check_pass', 'funds_type', 'funds_income',
						'funds_base_investment', 'funds_technology_investment',
						'funds_research_investment', 'funds_ratio', 'whichyear']
			}),
			autoLoad : true
		})
	}
});
research_money_gridpanel = Ext.extend(Ext.grid.GridPanel, {
	store : null,
	constructor : function() {
		this.store = new research_money_gridpanel_stroe();
		research_money_gridpanel.superclass.constructor.call(this, {
			loadMask : {
				msg : '数据加载中...'
			},
			iconCls : 'chimouser',
			ds : this.store,
			autoExpandColumn : 'funds_year',
			stripeRows : true,
			split : true,
			viewConfig : {
				forceFit : true
			},
			columns : [new Ext.grid.RowNumberer(), {
						id : 'funds_id',
						header : '',
						width : 80,
						hidden : true,
						sortable : true,
						dataIndex : 'funds_id'
					}, {
						id : 'enterprise_id',
						header : '',
						width : 80,
						hidden : true,
						sortable : true,
						dataIndex : 'enterprise_id'
					}, {
						id : 'funds_year',
						header : '申报年度',
						width : 100,
						renderer : this.getYearName,
						sortable : true,
						dataIndex : 'funds_year'
					}, {
						id : 'funds_income',
						header : '销售收入',
						width : 100,
						renderer : this.funds_incomename,
						sortable : true,
						dataIndex : 'funds_income'
					}, {
						id : 'funds_base_investment',
						header : '基本建设投资',
						width : 100,
						renderer : this.funds_base_investmentname,
						sortable : true,
						dataIndex : 'funds_base_investment'
					}, {
						id : 'funds_technology_investment',
						header : '技术改造投资',
						width : 100,
						renderer : this.funds_technology_investmentname,
						sortable : true,
						dataIndex : 'funds_technology_investment'
					}, {
						id : 'funds_research_investment',
						header : '研发投入',
						width : 100,
						renderer : this.funds_research_investmentname,
						sortable : true,
						dataIndex : 'funds_research_investment'
					}, {
						id : 'funds_ratio',
						header : '研销比',
						width : 100,
						renderer : this.funds_rationame,
						sortable : true,
						dataIndex : 'funds_ratio'
					}, {
						id : 'funds_intensity',
						header : '研销投入强度',
						width : 100,
						renderer : this.funds_intensityname,
						sortable : true,
						dataIndex : 'funds_intensity'
					}, {
						id : 'funds_type',
						header : '申报类型',
						width : 100,
						renderer : this.funds_typename,
						sortable : true,
						dataIndex : 'funds_type'
					}, {
						id : 'funds_check_pass',
						header : '审核结果',
						width : 100,
						renderer : this.funds_check_passname,
						sortable : true,
						dataIndex : 'funds_check_pass'
					}],
			tbar : ['-', {
				text : '删除',
				iconCls : 'delete',
				scope : this,
				handler : function() {
					var ro = this.getSelectionModel().getSelected();
					if (!ro) {
						Ext.Msg.alert('提示', '没有选择需要删除的数据');
						return;
					} else {
						var fundid = ro.get('funds_id');
						var eid = ro.get('enterprise_id');
						Ext.Ajax.request({
							url : 'cxxqysjsb/research_money/deleteresearchmoney.action',
							success : function(response, options) {
								if (response.responseText == 'ok') {
									Ext.Msg
											.alert('提示',
													'&nbsp&nbsp&nbsp&nbsp&nbsp数据删除成功&nbsp&nbsp&nbsp&nbsp');
									this.getStore().reload();
								} else {

									Ext.Msg.alert('提示', '服务器返回错误');
								}

							},
							params : {
								fundid : fundid,
								eid : eid
							},
							scope : this
						});
					}
				}

			}, '-']
		})
	},
	funds_check_passname : function(code) {
		return getCheckResultName(code);
	},
	funds_typename : function(code) {
		return '<font color="red">' + getDataType(code) + '</font>';
	},
	getYearName : function(value) {
		return value + '年';
	},
	funds_incomename : function(value) {
		return value + '万元';
	},
	funds_base_investmentname : function(value) {
		return value + '万元';
	},
	funds_technology_investmentname : function(value) {
		return value + '万元';
	},
	funds_research_investmentname : function(value) {
		return value + '万元';
	},
	funds_rationame : function(value) {
		return value + '%';
	},
	funds_intensityname : function(code) {
		return getfunds_intensity_combo_store(code);
	}
});
research_money_gridpanel_win = Ext.extend(Ext.Window, {
			panel : null,
			constructor : function() {
				this.panel = new research_money_gridpanel();
				research_money_gridpanel_win.superclass.constructor.call(this,
						{
							width : 800,
							height : 500,
							title : '研发投入强度数据',
							iconCls : 'smlEdit_edit',
							layout : 'fit',
							closeAction : 'hide',
							frame : true,
							modal : true,
							plain : true,
							items : this.panel
						});
			}
		});
// /////////////////////////专利情况
patent_gridpanel_stroe = Ext.extend(Ext.data.Store, {
	constructor : function() {
		patent_gridpanel_stroe.superclass.constructor.call(this, {
			proxy : new Ext.data.HttpProxy({
				method : 'GET',
				url : 'cxxqysjsb/enterprisepatent/getallenterprisepatents.action?uid='
						+ userId
			}),
			reader : new Ext.data.JsonReader({
						fields : ['patent_id', 'enterprise_id', 'editable',
								'patent_year', 'research_count',
								'thousand_count', 'invent_count',
								'practical_count', 'profile_count',
								'others_count', 'patent_type', 'patent_is_new',
								'patent_check_pass']
					}),
			autoLoad : true
		})
	}
});
patent_money_gridpanel = Ext.extend(Ext.grid.GridPanel, {
	store : null,
	constructor : function() {
		this.store = new patent_gridpanel_stroe();
		patent_money_gridpanel.superclass.constructor.call(this, {
			loadMask : {
				msg : '数据加载中...'
			},
			iconCls : 'chimouser',
			ds : this.store,
			autoExpandColumn : 'patent_year',
			stripeRows : true,
			split : true,
			viewConfig : {
				forceFit : true
			},
			columns : [new Ext.grid.RowNumberer(), {
						id : 'patent_id',
						header : '',
						width : 80,
						hidden : true,
						sortable : true,
						dataIndex : 'patent_id'
					}, {
						id : 'enterprise_id',
						header : '',
						width : 80,
						hidden : true,
						sortable : true,
						dataIndex : 'enterprise_id'
					}, {
						id : 'patent_year',
						header : '申报年度',
						width : 100,
						renderer : this.getYearName,
						sortable : true,
						dataIndex : 'patent_year'
					}, {
						id : 'research_count',
						header : '研发人员数',
						width : 100,
						sortable : true,
						dataIndex : 'research_count'
					}, {
						id : 'thousand_count',
						header : '专利数/千人',
						width : 100,
						sortable : true,
						dataIndex : 'thousand_count'
					}, {
						id : 'invent_count',
						header : '发明专利数',
						width : 100,
						sortable : true,
						dataIndex : 'invent_count'
					}, {
						id : 'practical_count',
						header : '使用新型',
						width : 100,
						sortable : true,
						dataIndex : 'practical_count'
					}, {
						id : 'profile_count',
						header : '外观设计',
						width : 100,
						sortable : true,
						dataIndex : 'profile_count'
					}, {
						id : 'others_count',
						header : '其他',
						width : 100,
						sortable : true,
						dataIndex : 'others_count'
					}, {
						id : 'patent_type',
						header : '申报类型',
						width : 100,
						renderer : this.funds_typename,
						sortable : true,
						dataIndex : 'patent_type'
					}, {
						id : 'patent_check_pass',
						header : '审核结果',
						width : 100,
						renderer : this.funds_check_passname,
						sortable : true,
						dataIndex : 'patent_check_pass'
					}],
			tbar : ['-', {
				text : '删除',
				iconCls : 'delete',
				scope : this,
				handler : function() {
					var ro = this.getSelectionModel().getSelected();
					if (!ro) {
						Ext.Msg.alert('提示', '没有选择需要删除的数据');
						return;
					} else {
						var pid = ro.get('patent_id');
						var eid = ro.get('enterprise_id');
						Ext.Ajax.request({
							url : 'cxxqysjsb/enterprisepatent/deleteenterprisepatent.action',
							success : function(response, options) {
								if (response.responseText == 'ok') {
									Ext.Msg
											.alert('提示',
													'&nbsp&nbsp&nbsp&nbsp&nbsp数据删除成功&nbsp&nbsp&nbsp&nbsp');
									this.getStore().reload();
								} else {

									Ext.Msg.alert('提示', '服务器返回错误');
								}

							},
							params : {
								pid : pid,
								eid : eid
							},
							scope : this
						});
					}
				}

			}, '-']
		})
	},
	funds_check_passname : function(code) {
		return getCheckResultName(code);
	},
	funds_typename : function(code) {
		return '<font color="red">' + getDataType(code) + '</font>';
	},
	getYearName : function(value) {
		return value + '年';
	},
	funds_incomename : function(value) {
		return value + '万元';
	},
	funds_base_investmentname : function(value) {
		return value + '万元';
	},
	funds_technology_investmentname : function(value) {
		return value + '万元';
	},
	funds_research_investmentname : function(value) {
		return value + '万元';
	},
	funds_rationame : function(value) {
		return value + '%';
	},
	funds_intensityname : function(code) {
		return getfunds_intensity_combo_store(code);
	}
});
patent_gridpanel_win = Ext.extend(Ext.Window, {
			panel : null,
			constructor : function() {
				this.panel = new patent_money_gridpanel();
				patent_gridpanel_win.superclass.constructor.call(this, {
							width : 800,
							height : 500,
							title : '企业专利情况',
							iconCls : 'smlEdit_edit',
							layout : 'fit',
							closeAction : 'hide',
							frame : true,
							modal : true,
							plain : true,
							items : this.panel
						});
			}
		});
// //////////////////////////////新产品 新工艺
new_gridpanel_stroe = Ext.extend(Ext.data.Store, {
	constructor : function() {
		new_gridpanel_stroe.superclass.constructor.call(this, {
			proxy : new Ext.data.HttpProxy({
						method : 'GET',
						url : 'cxxqysjsb/enterprisenew/getallenterprisenew.action?uid='
								+ userId
					}),
			reader : new Ext.data.JsonReader({
						fields : ['new_id', 'enterprise_id', 'editable',
								'new_is_new', 'new_check_pass', 'new_type',
								'new_income', 'new_all_income', 'new_ratio',
								'new_year']
					}),
			autoLoad : true
		})
	}
});
new_money_gridpanel = Ext.extend(Ext.grid.GridPanel, {
	store : null,
	constructor : function() {
		this.store = new new_gridpanel_stroe();
		new_money_gridpanel.superclass.constructor.call(this, {
			loadMask : {
				msg : '数据加载中...'
			},
			iconCls : 'chimouser',
			ds : this.store,
			autoExpandColumn : 'patent_year',
			stripeRows : true,
			split : true,
			viewConfig : {
				forceFit : true
			},
			columns : [new Ext.grid.RowNumberer(), {
						id : 'new_id',
						header : '',
						width : 80,
						hidden : true,
						sortable : true,
						dataIndex : 'new_id'
					}, {
						id : 'enterprise_id',
						header : '',
						width : 80,
						hidden : true,
						sortable : true,
						dataIndex : 'enterprise_id'
					}, {
						id : 'new_year',
						header : '申报年度',
						width : 100,
						renderer : this.getYearName,
						sortable : true,
						dataIndex : 'new_year'
					}, {
						id : 'new_income',
						header : '新产品收入',
						width : 100,
						renderer : this.funds_incomename,
						sortable : true,
						dataIndex : 'new_income'
					}, {
						id : 'new_all_income',
						header : '全部收入',
						width : 100,
						sortable : true,
						renderer : this.funds_incomename,
						dataIndex : 'new_all_income'
					}, {
						id : 'new_ratio',
						header : '销售比',
						width : 100,
						sortable : true,
						dataIndex : 'new_ratio'
					}, {
						id : 'new_type',
						header : '申报类型',
						width : 100,
						renderer : this.funds_typename,
						sortable : true,
						dataIndex : 'new_type'
					}, {
						id : 'new_check_pass',
						header : '审核结果',
						width : 100,
						renderer : this.funds_check_passname,
						sortable : true,
						dataIndex : 'new_check_pass'
					}],
			tbar : ['-', {
				text : '删除',
				iconCls : 'delete',
				scope : this,
				handler : function() {
					var ro = this.getSelectionModel().getSelected();
					if (!ro) {
						Ext.Msg.alert('提示', '没有选择需要删除的数据');
						return;
					} else {
						var pid = ro.get('new_id');
						var eid = ro.get('enterprise_id');
						Ext.Ajax.request({
							url : 'cxxqysjsb/enterprisenew/deleteenterprisenew.action',
							success : function(response, options) {
								if (response.responseText == 'ok') {
									Ext.Msg
											.alert('提示',
													'&nbsp&nbsp&nbsp&nbsp&nbsp数据删除成功&nbsp&nbsp&nbsp&nbsp');
									this.getStore().reload();
								} else {

									Ext.Msg.alert('提示', '服务器返回错误');
								}

							},
							params : {
								pid : pid,
								eid : eid
							},
							scope : this
						});
					}
				}

			}, '-']
		})
	},
	funds_check_passname : function(code) {
		return getCheckResultName(code);
	},
	funds_typename : function(code) {
		return '<font color="red">' + getDataType(code) + '</font>';
	},
	getYearName : function(value) {
		return value + '年';
	},
	funds_incomename : function(value) {
		return value + '万元';
	},
	funds_base_investmentname : function(value) {
		return value + '万元';
	},
	funds_technology_investmentname : function(value) {
		return value + '万元';
	},
	funds_research_investmentname : function(value) {
		return value + '万元';
	},
	funds_rationame : function(value) {
		return value + '%';
	},
	funds_intensityname : function(code) {
		return getfunds_intensity_combo_store(code);
	}
});
new_gridpanel_win = Ext.extend(Ext.Window, {
			panel : null,
			constructor : function() {
				this.panel = new new_money_gridpanel();
				new_gridpanel_win.superclass.constructor.call(this, {
							width : 800,
							height : 500,
							title : '企业专利情况',
							iconCls : 'smlEdit_edit',
							layout : 'fit',
							closeAction : 'hide',
							frame : true,
							modal : true,
							plain : true,
							items : this.panel
						});
			}
		});
// ///////////////////////////////////////////////////////////生产率的情况
product_gridpanel_stroe = Ext.extend(Ext.data.Store, {
	constructor : function() {
		product_gridpanel_stroe.superclass.constructor.call(this, {
			proxy : new Ext.data.HttpProxy({
				method : 'GET',
				url : 'cxxqysjsb/enterpriselabor_capacity_productivity/getalllabor_capacity_productivity.action?uid='
						+ userId
			}),
			reader : new Ext.data.JsonReader({
						fields : ['labor_capacity_id', 'enterprise_id',
								'editable', 'labor_capacity_staff_count',
								'labor_capacity_is_new',
								'labor_capacity_check_pass',
								'labor_capacity_type',
								'labor_capacity_added_value',
								'labor_capacity_productivity',
								'labor_capacity_year']
					}),
			autoLoad : true
		})
	}
});
product_money_gridpanel = Ext.extend(Ext.grid.GridPanel, {
	store : null,
	constructor : function() {
		this.store = new product_gridpanel_stroe();
		product_money_gridpanel.superclass.constructor.call(this, {
			loadMask : {
				msg : '数据加载中...'
			},
			iconCls : 'chimouser',
			ds : this.store,
			autoExpandColumn : 'labor_capacity_year',
			stripeRows : true,
			split : true,
			viewConfig : {
				forceFit : true
			},
			columns : [new Ext.grid.RowNumberer(), {
						id : 'labor_capacity_id',
						header : '',
						width : 80,
						hidden : true,
						sortable : true,
						dataIndex : 'labor_capacity_id'
					}, {
						id : 'enterprise_id',
						header : '',
						width : 80,
						hidden : true,
						sortable : true,
						dataIndex : 'enterprise_id'
					}, {
						id : 'labor_capacity_year',
						header : '申报年度',
						width : 100,
						renderer : this.getYearName,
						sortable : true,
						dataIndex : 'labor_capacity_year'
					}, {
						id : 'labor_capacity_added_value',
						header : '企业年增加值',
						width : 100,
						renderer : this.funds_incomename,
						sortable : true,
						dataIndex : 'labor_capacity_added_value'
					}, {
						id : 'labor_capacity_staff_count',
						header : '人员数',
						width : 100,
						sortable : true,
						renderer : this.labor_capacity_staff_countname,
						dataIndex : 'labor_capacity_staff_count'
					}, {
						id : 'labor_capacity_productivity',
						header : '生产率',
						width : 100,
						sortable : true,
						dataIndex : 'labor_capacity_productivity'
					}, {
						id : 'labor_capacity_type',
						header : '申报类型',
						width : 100,
						renderer : this.funds_typename,
						sortable : true,
						dataIndex : 'labor_capacity_type'
					}, {
						id : 'labor_capacity_check_pass',
						header : '审核结果',
						width : 100,
						renderer : this.funds_check_passname,
						sortable : true,
						dataIndex : 'labor_capacity_check_pass'
					}],
			tbar : ['-', {
				text : '删除',
				iconCls : 'delete',
				scope : this,
				handler : function() {
					var ro = this.getSelectionModel().getSelected();
					if (!ro) {
						Ext.Msg.alert('提示', '没有选择需要删除的数据');
						return;
					} else {
						var pid = ro.get('labor_capacity_id');
						var eid = ro.get('enterprise_id');
						Ext.Ajax.request({
							url : 'cxxqysjsb/enterpriselabor_capacity_productivity/deleteonelabor_capacity_productivity.action',
							success : function(response, options) {
								if (response.responseText == 'ok') {
									Ext.Msg
											.alert('提示',
													'&nbsp&nbsp&nbsp&nbsp&nbsp数据删除成功&nbsp&nbsp&nbsp&nbsp');
									this.getStore().reload();
								} else {

									Ext.Msg.alert('提示', '服务器返回错误');
								}

							},
							params : {
								pid : pid,
								eid : eid
							},
							scope : this
						});
					}
				}

			}, '-']
		})
	},
	labor_capacity_staff_countname : function(value) {
		return value + '人/年';
	},
	funds_check_passname : function(code) {
		return getCheckResultName(code);
	},
	funds_typename : function(code) {
		return '<font color="red">' + getDataType(code) + '</font>';
	},
	getYearName : function(value) {
		return value + '年';
	},
	funds_incomename : function(value) {
		return value + '万元';
	},
	funds_base_investmentname : function(value) {
		return value + '万元';
	},
	funds_technology_investmentname : function(value) {
		return value + '万元';
	},
	funds_research_investmentname : function(value) {
		return value + '万元';
	},
	funds_rationame : function(value) {
		return value + '%';
	},
	funds_intensityname : function(code) {
		return getfunds_intensity_combo_store(code);
	}
});
product_gridpanel_win = Ext.extend(Ext.Window, {
			panel : null,
			constructor : function() {
				this.panel = new product_money_gridpanel();
				product_gridpanel_win.superclass.constructor.call(this, {
							width : 800,
							height : 500,
							title : '企业生产率',
							iconCls : 'smlEdit_edit',
							layout : 'fit',
							closeAction : 'hide',
							frame : true,
							modal : true,
							plain : true,
							items : this.panel
						});
			}
		});
// //////////////////战略问题//////////////////////////////////////////////////////////////
strategy_gridpanel_stroe = Ext.extend(Ext.data.Store, {
	constructor : function() {
		strategy_gridpanel_stroe.superclass.constructor.call(this, {
					proxy : new Ext.data.HttpProxy({
								method : 'GET',
								url : 'cxxqysjsb/strategy/getalllstrategy.action?uid='
										+ userId
							}),
					reader : new Ext.data.JsonReader({
								fields : ['strategy_id', 'enterprise_id',
										'editable', 'strategy_made',
										'strategy_year', 'strategy_implement',
										'strategy_is_new',
										'strategy_check_pass', 'strategy_type']
							}),
					autoLoad : true
				})
	}
});
management_gridpanel_stroe = Ext.extend(Ext.data.Store, {
	constructor : function() {
		management_gridpanel_stroe.superclass.constructor.call(this, {
			proxy : new Ext.data.HttpProxy({
						method : 'GET',
						url : 'cxxqysjsb/strategy/getalllmanagement.action?uid='
								+ userId
					}),
			reader : new Ext.data.JsonReader({
						fields : ['management_id', 'enterprise_id', 'editable',
								'management_year',
								'management_intellectual_property',
								'management_encourage', 'management_is_new',
								'management_check_pass', 'management_type']
					}),
			autoLoad : true
		})
	}
});
brand_gridpanel_stroe = Ext.extend(Ext.data.Store, {
	constructor : function() {
		brand_gridpanel_stroe.superclass.constructor.call(this, {
					proxy : new Ext.data.HttpProxy({
								method : 'GET',
								url : 'cxxqysjsb/strategy/getallbrand.action?uid='
										+ userId
							}),
					reader : new Ext.data.JsonReader({
								fields : ['brand_id', 'enterprise_id',
										'editable', 'brand_type', 'brand_have',
										'brand_make', 'brand_year',
										'brand_is_new', 'brand_check_pass']
							}),
					autoLoad : true
				})
	}
});
brand_money_gridpanel = Ext.extend(Ext.grid.GridPanel, {
	constructor : function() {
		this.store = new brand_gridpanel_stroe();
		brand_money_gridpanel.superclass.constructor.call(this, {
			loadMask : {
				msg : '数据加载中...'
			},
			iconCls : 'chimouser',
			ds : this.store,
			autoExpandColumn : 'brand_year',
			stripeRows : true,
			split : true,
			viewConfig : {
				forceFit : true
			},
			columns : [new Ext.grid.RowNumberer(), {
						id : 'brand_id',
						header : '',
						width : 80,
						hidden : true,
						sortable : true,
						dataIndex : 'brand_id'
					}, {
						id : 'enterprise_id',
						header : '',
						width : 80,
						hidden : true,
						sortable : true,
						dataIndex : 'enterprise_id'
					}, {
						id : 'brand_year',
						header : '申报年度',
						width : 100,
						renderer : this.getYearName,
						sortable : true,
						dataIndex : 'brand_year'
					}, {
						id : 'brand_have',
						header : '制定情况',
						width : 100,
						// renderer : this.funds_incomename,
						sortable : true,
						dataIndex : 'brand_have'
					}, {
						id : 'brand_make',
						header : '制定实施',
						width : 100,
						sortable : true,
						// renderer : this.labor_capacity_staff_countname,
						dataIndex : 'brand_make'
					}, {
						id : 'brand_type',
						header : '申报类型',
						width : 100,
						renderer : this.funds_typename,
						sortable : true,
						dataIndex : 'brand_type'
					}, {
						id : 'brand_check_pass',
						header : '审核结果',
						width : 100,
						renderer : this.funds_check_passname,
						sortable : true,
						dataIndex : 'brand_check_pass'
					}],
			tbar : ['-', {
				text : '删除',
				iconCls : 'delete',
				scope : this,
				handler : function() {
					var ro = this.getSelectionModel().getSelected();
					if (!ro) {
						Ext.Msg.alert('提示', '没有选择需要删除的数据');
						return;
					} else {
						var pid = ro.get('brand_id');
						var eid = ro.get('enterprise_id');
						Ext.Ajax.request({
							url : 'cxxqysjsb/strategy/deletesbm.action',
							success : function(response, options) {
								if (response.responseText == 'ok') {
									Ext.Msg
											.alert('提示',
													'&nbsp&nbsp&nbsp&nbsp&nbsp数据删除成功&nbsp&nbsp&nbsp&nbsp');
									this.getStore().reload();
								} else {

									Ext.Msg.alert('提示', '服务器返回错误');
								}

							},
							params : {
								flag : 3,// 删除brand
								pid : pid,
								eid : eid
							},
							scope : this
						});
					}
				}

			}, '-']
		})
	},
	labor_capacity_staff_countname : function(value) {
		return value + '人/年';
	},
	funds_check_passname : function(code) {
		return getCheckResultName(code);
	},
	funds_typename : function(code) {
		return '<font color="red">' + getDataType(code) + '</font>';
	},
	getYearName : function(value) {
		return value + '年';
	},
	funds_incomename : function(value) {
		return value + '万元';
	},
	funds_base_investmentname : function(value) {
		return value + '万元';
	},
	funds_technology_investmentname : function(value) {
		return value + '万元';
	},
	funds_research_investmentname : function(value) {
		return value + '万元';
	},
	funds_rationame : function(value) {
		return value + '%';
	},
	funds_intensityname : function(code) {
		return getfunds_intensity_combo_store(code);
	}
});
management_money_gridpanel = Ext.extend(Ext.grid.GridPanel, {
	constructor : function() {
		this.store = new management_gridpanel_stroe();
		management_money_gridpanel.superclass.constructor.call(this, {
			loadMask : {
				msg : '数据加载中...'
			},
			iconCls : 'chimouser',
			ds : this.store,
			autoExpandColumn : 'management_year',
			stripeRows : true,
			split : true,
			viewConfig : {
				forceFit : true
			},
			columns : [new Ext.grid.RowNumberer(), {
						id : 'management_id',
						header : '',
						width : 80,
						hidden : true,
						sortable : true,
						dataIndex : 'management_id'
					}, {
						id : 'enterprise_id',
						header : '',
						width : 80,
						hidden : true,
						sortable : true,
						dataIndex : 'enterprise_id'
					}, {
						id : 'management_year',
						header : '申报年度',
						width : 100,
						renderer : this.getYearName,
						sortable : true,
						dataIndex : 'management_year'
					}, {
						id : 'management_intellectual_property',
						header : '制定情况',
						width : 100,
						// renderer : this.funds_incomename,
						sortable : true,
						dataIndex : 'management_intellectual_property'
					}, {
						id : 'management_encourage',
						header : '制定实施',
						width : 100,
						sortable : true,
						// renderer : this.labor_capacity_staff_countname,
						dataIndex : 'management_encourage'
					}, {
						id : 'management_type',
						header : '申报类型',
						width : 100,
						renderer : this.funds_typename,
						sortable : true,
						dataIndex : 'management_type'
					}, {
						id : 'management_check_pass',
						header : '审核结果',
						width : 100,
						renderer : this.funds_check_passname,
						sortable : true,
						dataIndex : 'management_check_pass'
					}],
			tbar : ['-', {
				text : '删除',
				iconCls : 'delete',
				scope : this,
				handler : function() {
					var ro = this.getSelectionModel().getSelected();
					if (!ro) {
						Ext.Msg.alert('提示', '没有选择需要删除的数据');
						return;
					} else {
						var pid = ro.get('management_id');
						var eid = ro.get('enterprise_id');
						Ext.Ajax.request({
							url : 'cxxqysjsb/strategy/deletesbm.action',
							success : function(response, options) {
								if (response.responseText == 'ok') {
									Ext.Msg
											.alert('提示',
													'&nbsp&nbsp&nbsp&nbsp&nbsp数据删除成功&nbsp&nbsp&nbsp&nbsp');
									this.getStore().reload();
								} else {

									Ext.Msg.alert('提示', '服务器返回错误');
								}

							},
							params : {
								flag : 2,// 删除management
								pid : pid,
								eid : eid
							},
							scope : this
						});
					}
				}

			}, '-']
		})
	},
	labor_capacity_staff_countname : function(value) {
		return value + '人/年';
	},
	funds_check_passname : function(code) {
		return getCheckResultName(code);
	},
	funds_typename : function(code) {
		return '<font color="red">' + getDataType(code) + '</font>';
	},
	getYearName : function(value) {
		return value + '年';
	},
	funds_incomename : function(value) {
		return value + '万元';
	},
	funds_base_investmentname : function(value) {
		return value + '万元';
	},
	funds_technology_investmentname : function(value) {
		return value + '万元';
	},
	funds_research_investmentname : function(value) {
		return value + '万元';
	},
	funds_rationame : function(value) {
		return value + '%';
	},
	funds_intensityname : function(code) {
		return getfunds_intensity_combo_store(code);
	}
});
Strangery_money_gridpanel = Ext.extend(Ext.grid.GridPanel, {
	constructor : function() {
		this.store = new strategy_gridpanel_stroe();
		Strangery_money_gridpanel.superclass.constructor.call(this, {
			loadMask : {
				msg : '数据加载中...'
			},
			iconCls : 'chimouser',
			ds : this.store,
			autoExpandColumn : 'strategy_year',
			stripeRows : true,
			split : true,
			viewConfig : {
				forceFit : true
			},
			columns : [new Ext.grid.RowNumberer(), {
						id : 'strategy_id',
						header : '',
						width : 80,
						hidden : true,
						sortable : true,
						dataIndex : 'strategy_id'
					}, {
						id : 'enterprise_id',
						header : '',
						width : 80,
						hidden : true,
						sortable : true,
						dataIndex : 'enterprise_id'
					}, {
						id : 'strategy_year',
						header : '申报年度',
						width : 100,
						renderer : this.getYearName,
						sortable : true,
						dataIndex : 'strategy_year'
					}, {
						id : 'strategy_made',
						header : '制定情况',
						width : 100,
						// renderer : this.funds_incomename,
						sortable : true,
						dataIndex : 'strategy_made'
					}, {
						id : 'strategy_implement',
						header : '制定实施',
						width : 100,
						sortable : true,
						// renderer : this.labor_capacity_staff_countname,
						dataIndex : 'strategy_implement'
					}, {
						id : 'strategy_type',
						header : '申报类型',
						width : 100,
						renderer : this.funds_typename,
						sortable : true,
						dataIndex : 'strategy_type'
					}, {
						id : 'strategy_check_pass',
						header : '审核结果',
						width : 100,
						renderer : this.funds_check_passname,
						sortable : true,
						dataIndex : 'strategy_check_pass'
					}],
			tbar : ['-', {
				text : '删除',
				iconCls : 'delete',
				scope : this,
				handler : function() {
					var ro = this.getSelectionModel().getSelected();
					if (!ro) {
						Ext.Msg.alert('提示', '没有选择需要删除的数据');
						return;
					} else {
						var pid = ro.get('strategy_id');
						var eid = ro.get('enterprise_id');
						Ext.Ajax.request({
							url : 'cxxqysjsb/strategy/deletesbm.action',
							success : function(response, options) {
								if (response.responseText == 'ok') {
									Ext.Msg
											.alert('提示',
													'&nbsp&nbsp&nbsp&nbsp&nbsp数据删除成功&nbsp&nbsp&nbsp&nbsp');
									this.getStore().reload();
								} else {

									Ext.Msg.alert('提示', '服务器返回错误');
								}

							},
							params : {
								flag : 1,// 删除战略
								pid : pid,
								eid : eid
							},
							scope : this
						});
					}
				}

			}, '-']
		})
	},
	labor_capacity_staff_countname : function(value) {
		return value + '人/年';
	},
	funds_check_passname : function(code) {
		return getCheckResultName(code);
	},
	funds_typename : function(code) {
		return '<font color="red">' + getDataType(code) + '</font>';
	},
	getYearName : function(value) {
		return value + '年';
	},
	funds_incomename : function(value) {
		return value + '万元';
	},
	funds_base_investmentname : function(value) {
		return value + '万元';
	},
	funds_technology_investmentname : function(value) {
		return value + '万元';
	},
	funds_research_investmentname : function(value) {
		return value + '万元';
	},
	funds_rationame : function(value) {
		return value + '%';
	},
	funds_intensityname : function(code) {
		return getfunds_intensity_combo_store(code);
	}
});
innovation_gridpanel_stroe = Ext.extend(Ext.data.Store, {
	constructor : function() {
		innovation_gridpanel_stroe.superclass.constructor.call(this, {
					proxy : new Ext.data.HttpProxy({
								method : 'GET',
								url : 'cxxqysjsb/innovation/getallinnovation.action?uid='
										+ userId
							}),
					reader : new Ext.data.JsonReader({
								fields : ['innovation_id', 'enterprise_id',
										'editable', 'innovation_is_new', 'innovation_check_pass',
										'innovation_type', 'innovation_year',
										'innovation_idea', 'innovation_staff_suggestion','innovation_exercise']
							}),
					autoLoad : true
				})
	}
});	
innovation_money_gridpanel = Ext.extend(Ext.grid.GridPanel, {
	constructor : function() {
		this.store = new innovation_gridpanel_stroe();
		innovation_money_gridpanel.superclass.constructor.call(this, {
			loadMask : {
				msg : '数据加载中...'
			},
			iconCls : 'chimouser',
			ds : this.store,
			autoExpandColumn : 'innovation_year',
			stripeRows : true,
			split : true,
			viewConfig : {
				forceFit : true
			},
			columns : [new Ext.grid.RowNumberer(), {
						id : 'innovation_id',
						header : '',
						width : 80,
						hidden : true,
						sortable : true,
						dataIndex : 'innovation_id'
					}, {
						id : 'enterprise_id',
						header : '',
						width : 80,
						hidden : true,
						sortable : true,
						dataIndex : 'enterprise_id'
					}, {
						id : 'innovation_year',
						header : '申报年度',
						width : 100,
						renderer : this.getYearName,
						sortable : true,
						dataIndex : 'innovation_year'
					}, {
						id : 'innovation_idea',
						header : '创新理念',
						width : 100,
						// renderer : this.funds_incomename,
						sortable : true,
						dataIndex : 'innovation_idea'
					}, {
						id : 'innovation_staff_suggestion',
						header : '员工建议',
						width : 100,
						sortable : true,
						// renderer : this.labor_capacity_staff_countname,
						dataIndex : 'innovation_staff_suggestion'
					}, {
						id : 'innovation_exercise',
						header : '实施情况',
						width : 100,
						sortable : true,
						// renderer : this.labor_capacity_staff_countname,
						dataIndex : 'innovation_exercise'
					}, {
						id : 'innovation_type',
						header : '申报类型',
						width : 100,
						renderer : this.funds_typename,
						sortable : true,
						dataIndex : 'innovation_type'
					}, {
						id : 'innovation_check_pass',
						header : '审核结果',
						width : 100,
						renderer : this.funds_check_passname,
						sortable : true,
						dataIndex : 'innovation_check_pass'
					}],
			tbar : ['-', {
				text : '删除',
				iconCls : 'delete',
				scope : this,
				handler : function() {
					var ro = this.getSelectionModel().getSelected();
					if (!ro) {
						Ext.Msg.alert('提示', '没有选择需要删除的数据');
						return;
					} else {
						var pid = ro.get('innovation_id');
						var eid = ro.get('enterprise_id');
						Ext.Ajax.request({
							url : 'cxxqysjsb/strategy/deletesbm.action',
							success : function(response, options) {
								if (response.responseText == 'ok') {
									Ext.Msg
											.alert('提示',
													'&nbsp&nbsp&nbsp&nbsp&nbsp数据删除成功&nbsp&nbsp&nbsp&nbsp');
									this.getStore().reload();
								} else {

									Ext.Msg.alert('提示', '服务器返回错误');
								}

							},
							params : {
								flag : 4,// 删除战略
								pid : pid,
								eid : eid
							},
							scope : this
						});
					}
				}

			}, '-']
		})
	},
	labor_capacity_staff_countname : function(value) {
		return value + '人/年';
	},
	funds_check_passname : function(code) {
		return getCheckResultName(code);
	},
	funds_typename : function(code) {
		return '<font color="red">' + getDataType(code) + '</font>';
	},
	getYearName : function(value) {
		return value + '年';
	},
	funds_incomename : function(value) {
		return value + '万元';
	},
	funds_base_investmentname : function(value) {
		return value + '万元';
	},
	funds_technology_investmentname : function(value) {
		return value + '万元';
	},
	funds_research_investmentname : function(value) {
		return value + '万元';
	},
	funds_rationame : function(value) {
		return value + '%';
	},
	funds_intensityname : function(code) {
		return getfunds_intensity_combo_store(code);
	}
});
smb_gridpanel_win = Ext.extend(Ext.Window, {
			panel : null,
			constructor : function(cfg) {
				if (cfg.flag == '1') {
					this.panel = new Strangery_money_gridpanel();
				}
				if (cfg.flag == '2') {
					this.panel = new management_money_gridpanel();
				}
				if (cfg.flag == '3') {
					this.panel = new brand_money_gridpanel();
				}
				if(cfg.flag == '4'){
				this.panel = new innovation_money_gridpanel();
				}
				smb_gridpanel_win.superclass.constructor.call(this, {
							width : 800,
							height : 500,
							title : '战略实施',
							iconCls : 'smlEdit_edit',
							layout : 'fit',
							closeAction : 'hide',
							frame : true,
							modal : true,
							plain : true,
							items : this.panel
						});
			}
		});
//、、、、、、、、、、、、、、、、、、、、、、、、、、、、、、、、、//////////////////////////文化创新活动
